added SSCLI 1.0
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSWinFormControls / ReadMe.txt
blobf18f6e31bfb9ef7e4e10f418dbff22dcb11081a5
1 ================================================================================
2        WINDOWS FORMS APPLICATION : CSWinFormControls Project Overview
3        
4                         Control Customization Sample
5                         
6 ===============================================================================
8 /////////////////////////////////////////////////////////////////////////////
9 Use:
11 The Control Customization sample demonstrates how to customize the Windows Forms 
12 controls.
14 In this sample, there're 4 examples:
16 1. Multiple Column ComboBox.
17    Demonstrates how to display multiple columns of data in the dropdown of a ComboBox.
18 2. ListBox Items With Different ToolTips.
19    Demonstrates how to display different tooltips on each items of the ListBox.
20 3. Numeric-only TextBox.
21    Demonstrates how to make a TextBox only accepts numbers.
22 4. A Round Button.
23    Demonstrates how to create a Button with irregular shape.
24    
26 /////////////////////////////////////////////////////////////////////////////
27 Code Logic:
29 1. Example 1: "Multiple Column ComboBox".
31    1). Create a DataTable with several columns and rows of data;
32    2). Data bind the ComboBox control to the DataTable;
33    3). Enable the owner draw on ComboBox by setting the DrawMode property to 
34        DrawMode.OwnerDrawFixed;
35    4). Handle the DrawItem event on the ComboBox;
36    5). In the DrawItem event handler, compute the bounds for each column and 
37        draw corresponding value for each column on its bounds.
39 2. Example 2: "ListBox Items With Different ToolTips".
41    1). Add some items to the ListBox control;
42    2). Handle the MouseMove event on the ListBox control;
43    3). Call the ListBox.IndexFromPoint method to retrieve the item index at 
44        where the mouse hovers;
45    4). If the mouse is over the items, call ToolTip.SetToolTip method to display
46        a tooltip for the individual item.
47    
48 3. Example 3: "Numeric-only TextBox".
50    The make a TextBox accepts only numbers, we can handle the TextBox.KeyPress 
51    event, in the event handler use char.IsNumber method to filter the input keys.
52    
53 4. Example 4: "A Round Button".
55    The key point of creating a round button is changing its Region property.
56    
58 /////////////////////////////////////////////////////////////////////////////
59 References:
61 1. Windows Forms General FAQ.
62    http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/77a66f05-804e-4d58-8214-0c32d8f43191
64 2. Shaped Windows Forms and Controls in Visual Studio .NET
65    http://msdn.microsoft.com/en-us/library/aa289517.aspx
67 3. Round Button in C#
68    http://www.codeproject.com/KB/buttons/RoundButton_csharp.aspx
71 /////////////////////////////////////////////////////////////////////////////